package com.zycfc.zsf.boot.serializer.hessian;

import java.math.*;
import com.caucho.hessian.io.*;

public class HessionBigDecimalSerializerFactory extends AbstractSerializerFactory
{
    private static final StringValueSerializer BIG_DECIMAL_SERIALIZER;
    private static final BigDecimalDeserializer BIGD_ECIMAL_DESERIALIZER;
    
    public Serializer getSerializer(final Class cl) throws HessianProtocolException {
        if (BigDecimal.class.isAssignableFrom(cl)) {
            return (Serializer)HessionBigDecimalSerializerFactory.BIG_DECIMAL_SERIALIZER;
        }
        return null;
    }
    
    public Deserializer getDeserializer(final Class cl) throws HessianProtocolException {
        if (BigDecimal.class.isAssignableFrom(cl)) {
            return (Deserializer)HessionBigDecimalSerializerFactory.BIGD_ECIMAL_DESERIALIZER;
        }
        return null;
    }
    
    static {
        BIG_DECIMAL_SERIALIZER = new StringValueSerializer();
        BIGD_ECIMAL_DESERIALIZER = new BigDecimalDeserializer();
    }
}
